package com.example.mobile2032021606128wengjiaer0307;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {
    TextView tvResult; //定义1个文本控件变量


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        tvResult = findViewById(R.id.tvResult);
        tvResult.setText("广东职业技术学院信息工程系移动203班");

        int result = 0;
        for (int i = 0;i<10;i++) {
            result+=i;
        }

        tvResult.setText("结果："+String.valueOf(result));

    }
}